package com.ztgf.commodity.models.service;

import com.baomidou.mybatisplus.service.IService;
import com.ztgf.commodity.models.bo.CommodityUnitSaveBO;
import com.ztgf.commodity.models.dto.CommodityUnitDTO;
import com.ztgf.commodity.models.vo.CommodityCategoryUnitVO;
import com.ztgf.common.constant.Result;

import java.util.List;

/**
 * author: chenyu.wang
 * date: 2020-05-26 11:56
 * Description:
 */
public interface ICommodityUnitService extends IService<CommodityUnitDTO> {
    /**
     * description: 添加商品单位
     * param: [saveBO]
     * author: chenyu.wang
     * date: 2020-05-26
     * return: boolean
     */
    Result<List<String>> add(CommodityUnitSaveBO saveBO);

    /**
     * description: 逻辑删除，恢复
     * param: [id]
     * author: chenyu.wang
     * date: 2020-05-26
     * return: boolean
     */
    boolean deleteLogic(Long id);

    /**
     * description: 查询商品类目单位
     * param: [categoryId]
     * author: chenyu.wang
     * date: 2020-07-23
     * return: java.util.List<com.ztgf.commodity.models.vo.CommodityCategoryUnitVO>
     */
    List<CommodityCategoryUnitVO> queryCategoryUnit(Long categoryId, Long brandId);

    String getUnitids();//获取所有的单位ids
}
